package c03数据类型和运算符;

/**
 * @author yuanwl
 * @date 2019-05-05 14:27
 */
public class 日期时间字符串比较 {
	public static void main(String[] args) {
		String date1 = "2017-03-08";
		String date2 = "2017-03-10";
		String date3 = "2017-03-02";
		String date4 = "2017-03-01";

		System.out.println(date1.compareTo(date2));
		System.out.println(date3.compareTo(date4));

		String t1 = "11:00:00";
		String t2 = "11:00:20";
		String t3 = "18:00:00";
		System.err.println(t1.compareTo(t2));
		System.err.println(t1.compareTo(t3));
	}
}
